<template>
  <t-page-two
      ref="pageTwo"
      :form-desc="formDesc"

      url-page="/sys/dict/item/query/page"
      url-add="/sys/dict/item/add"
      url-update="/sys/dict/item/update"
      url-query-by-id="/sys/dict/item/query/one/"
      url-delete-by-ids="/sys/dict/item/deleteByIds"

      :depend-id="{dictId: $route.query.dictId}">
  </t-page-two>
</template>

<script>
export default {
  data() {
    return {
      /* 表单 */
      formDesc: {
        itemValue: {
          label: '键值',
          type: 'input',
          rules: [
            {required: true, message: '该项必填', trigger: 'blur'},
            {min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'},
            {pattern: /^\w+$/, message: '由数字、字母、下划线组成', trigger: 'blur'},
          ],
          //表格列配置
          colCfg: {
            width: '180'
          }
        },
        itemLabel: {
          label: '描述',
          type: 'input',
          rules: [
            {required: true, message: '该项必填', trigger: 'blur'},
            {min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur'},
            {pattern: /^[\u4E00-\u9FA5A-Za-z0-9_]+$/, message: '由中文、数字、字母、下划线组成', trigger: 'blur'},
          ],
          colCfg: {
          }
        },
      },
    }
  },
  methods: {},
  mounted() {
    this.$refs['pageTwo'].loadTableData()
  }
}
</script>

<style scoped>

</style>